public class Leetcode2027 {
    public int minimumMoves(String s) {
        char[] chars = s.toCharArray();
        int res = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] == 'X') {
                i += 2;
                ++res;
            }
        }

        return res;
    }
}
